Use the following code as an example of how to call the PEGetGraphOptions and PESetGraphOptions functions:
short sectionCode,
// The report section the graph is in
graphN;
// The graph number in the section
struct PEGraphOptions graphOptions;
sectionCode = PE_DETAILSECTION;
// Graph is in Details section
graphN = 0;
// First graph in section
// Initialize size of graphOptions structure
graphOptions.StructSize = sizeof(PEGraphOptions);
if (! PEGetGraphOptions(Job, sectionCode, graphN, &graphOptions)){
// Handle error
}
short sectionCode,
// The report section the graph is in
graphN;
// The graph number in the section
struct PEGraphOptions graphOptions;
sectionCode = PE_HEADERSECTION;
// Graph is in Page Header section
graphN = 1;
// Second graph in section
// Initialize members of graphOptions structure
graphOptions.StructSize = sizeof(PEGraphDataInfo);
graphOptions.graphMaxValue = 100; // Do not graph values over 100
graphOptions.graphMinValue = 10; // Do not graph values under 10
graphOptions.showDataValue = TRUE; // Show data values on risers
graphOptions.showGridLine = TRUE; // Show grid lines
graphOptions.verticalBars = FALSE; // Use Horizontal bars in bar graph
graphOptions.showLegend = FALSE; // Do not use a legend
lstrcpy(graphOptions.fontFaceName, "Courier"); // Use Courier font
if (! PESetGraphOptions(Job, sectionCode, graphN, &graphOptions)){
// Handle error
}
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |